package com.muyu.product.service.impl;

import com.muyu.common.core.domain.R;
import com.muyu.product.domain.ProductBrand;
import com.muyu.product.domain.vo.ProductBrandVo;
import com.muyu.product.mapper.ProductBrandMapper;
import com.muyu.product.service.ProductBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName ProductBrandServiceImpl
 * @Description 描述
 * @Author ShiYu.Cui
 * @Date 2024/3/29 20:58
 */
@Service
public class ProductBrandServiceImpl implements ProductBrandService {
    @Autowired
    private ProductBrandMapper productBrandMapper;


    @Override
    public void addBrand(ProductBrand productBrand) {
        productBrandMapper.addBrand(productBrand);
    }

    @Override
    public R<List<ProductBrand>> brandList(ProductBrandVo productBrandVo) {
        List<ProductBrand> list = productBrandMapper.brandList(productBrandVo);
        return R.ok(list);
    }

    @Override
    public void updateBrand(ProductBrand productBrand) {
        productBrandMapper.updateBrand(productBrand);
    }

    @Override
    public void delBrand(Integer id) {
        productBrandMapper.delBrand(id);
    }

}
